<template>
  <div>
    <video
      id="my-video"
      class="video-js vjs-default-skin"
      controls
      preload="auto"
      poster="../assets/images/logo.png"
    >
      <source id="source" type="application/x-mpegURL">
    </video>
  </div>
</template>

<script>
import videojs from 'video.js'
import 'videojs-contrib-hls'

export default {
  name: 'name',
  components: {},
  data() {
    return {
      src: ''
    }
  },
  props: {},
  computed: {},
  watch: {},
  created() { },
  mounted() {
    document.getElementById("source").src = 'http://103.20.114.97:8866/01053964463/78541314501542382536818440334892/78541314501542382536818440334892.m3u8'
    // this.src = "http://103.20.114.97:8866/01053964463/78541314501542382536818440334892/78541314501542382536818440334892.m3u8"
    videojs('my-video', {
      bigPlayButton: false,
      textTrackDisplay: false,
      posterImage: true,
      errorDisplay: false,
      controlBar: true
    }, function () {
      this.play()
    })
  },
  updated() { },
  destroyed() { },
  methods: {}
}

</script>

<style scoped>
</style>
